/**
 * 包含应用中所有接口请求函数的模块
 * 每个函数的返回值都是Promise
 */
import request from './request.js'
import BASE from './config.js'

// 获取用户信息
export const reqUser = () => request(BASE + '/user/findAll.do')

// 获取首页轮播图
export const reqSwipers = () => request(BASE + '/home/findAllSwipers.do')

// 获取首页商品列表
export const reqGoodsList = (pageNum) => request(BASE + '/goods/getGoodsList.do',{pageNum})

// 获取图片分类
export const reqImgCategory = () => request(BASE + '/imgCategory/findAll.do')

// 获取图片分类详情
export const reqImgCategoryDetail = (pid) => request(BASE + '/imgCategory/categoryDetail.do',{pid})

// 获取咨询列表
export const reqNewsList = () => request(BASE + '/news/findAll.do')

// 获取资讯列表详情
export const reqNewsDetail = (pid) => request(BASE + '/news/findDetailById.do',{pid})

// 获取商品详情页轮播图
export const reqGoodsSwipers = (id) => request(BASE + '/goods/getGoodsSwipers.do',{id})





